function showLocation(province , city , town , multi) {

    var loc	= new Location();
    var title	= ['省份' , '地级市' , '市、县、区'];
    $.each(title , function(k , v) {
        title[k]	= '<option value="">'+v+'</option>';
    });

    var provinceElem = $('#loc_province1'+ multi);
    var cityElem  = $('#loc_city1'+ multi);
    var townElem = $('#loc_town1'+ multi);

    provinceElem.append(title[0]);
    cityElem.append(title[1]);
    townElem.append(title[2]);


    //这行报错是为什么？
    // $("#loc_province,#loc_city,#loc_town").select2()

    provinceElem.change(function() {
        cityElem.empty();
        cityElem.append(title[1]);
        loc.fillOption('loc_city1' + multi , '0,'+provinceElem.val());
        cityElem.change()
    });

    cityElem.change(function() {
        townElem.empty();
        townElem.append(title[2]);
        loc.fillOption('loc_town1' + multi, '0,' + provinceElem.val() + ',' + cityElem.val());
    });

    townElem.change(function() {
        $('input[name=location_id]').val($(this).val());
    });

    if (province) {
        loc.fillOption('loc_province1'+ multi , '0' , province);

        if (city) {
            loc.fillOption('loc_city1' + multi, '0,'+province , city);

            if (town) {
                loc.fillOption('loc_town1' + multi, '0,'+province+','+city , town);
            }
        }

    } else {
        loc.fillOption('loc_province1' + multi, '0');
    }

}

$(function(){
    // showLocation();
    showLocation('','','','');
    showLocation('','','','_2');
});